<%@ page import="com.zx.mobile.domain.MobileUserDomain" %>
<%@ page import="com.zx.mobile.SessionHelper" %>
<!doctype html>
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
         language="java" %>
<%@ include file="/jsp/mobile/include/include.jsp" %>
<html lang="cn">
<head>
    <%@ include file="/jsp/mobile/include/header.jsp" %>
    <title>历史收款账号</title>
</head>
<body class="nobg">
<%-- <div class="head">
   <div class="auto">
       <span class="tit">结算银行卡</span>
       <a href="<%=request.getContextPath()%>/mobile/index/mywallet" class="ico retu"></a>
       <a href="###" class="ico add"></a>
   </div>
</div> --%>
<div class="main">
    <div class="bankd">
        <input type="hidden" id="transAmt" value="${model.transAmt}"/>
        <ul>
            <c:forEach var="historyPayCard" items="${list}">
                <li>
                    <p class="img">
                        <img
                                src="<%=request.getContextPath()%>/images/mobile/${historyPayCard.bankCode}.png">
                    </p>

                    <div class="bankNm" id="toggleid${historyPayCard.bankAccount}">
                        <p class="tit">
                            <common:getDicByCode key="2100"
                                                 value="${historyPayCard.bankCode}"/>
                        </p>

                        <p class="con">
								<span>尾号<c:out value="${historyPayCard.lastCardNo}"/>
								</span> <span> <c:choose>
                            <c:when test="${historyPayCard.debitFlag == 'D'}">储蓄卡</c:when>
                            <c:when test="${historyPayCard.debitFlag == 'C'}">信用卡</c:when>
                            <c:otherwise></c:otherwise>
                        </c:choose> </span>
                        </p>
                        <i id="collasp${historyPayCard.bankAccount}" class="ico ico16"></i>
                    </div>
                    <div class="bankMg" id="bankMg">
                        <c:choose>
                            <c:when test="${historyPayCard.debitFlag == 'D'}">
                                <p>
                                    开户名：
                                    <c:out value="${historyPayCard.shortName}"/>
                                </p>
                            </c:when>
                            <c:otherwise></c:otherwise>
                        </c:choose>
                        <p>
                            账户：
                            <c:out value="${historyPayCard.shortCardNo}"/>
                        </p>
                    </div>
                </li>
            </c:forEach>
        </ul>
    </div>
</div>
<script type="text/javascript">

    $("[id^=toggleid]").bind("click", function() {
        var _bankAccount= $(this).attr("id").substr(8);
        var _transAmt = $("#transAmt").val();
        window.location.href = "<%=request.getContextPath()%>/mobile/index/cardseleteback?transAmt=" + _transAmt
                + "&bankAccount=" +_bankAccount;
    });
    $("[id^=collasp]").bind("click", function(event) {
        var _index = $(this).attr("id").substr(7);
        event.stopPropagation();
        $(this).parent().next().toggle();
        var _i = $(this);
        if (_i.hasClass('ico15')) {
            _i.removeClass("ico15").addClass("ico16");
        } else {
            _i.removeClass("ico16").addClass("ico15");
        }
    });
</script>
</body>
</html>